/* 
 * File:   Eval.h
 * Author: Gab'z
 *
 * Created on 1 juin 2012, 21:51
 */

#ifndef EVAL_H
#define	EVAL_H

#include "../UndoableRedoableCommand.h"
#include "../../../exception/ArithmeticException.h"
#include "../../../log/LogSystem.h"

namespace calculator {
    class Stack;

    class Eval : public UndoableRedoableCommand {
        friend class CommandMap;

    public:
        virtual ~Eval();

        virtual Eval* clone() const;

        void execute() const throw (CommandException);
        std::string isExecutable() const;

        const Memento* createMemento() const throw (CommandException);
        void restoreFromMemento(const Memento* memento) const throw (MementoException);

    private:
        Eval(const Eval& orig);
        Eval(const std::string name);
        static Logger* log;
    };
}

#endif	/* EVAL_H */

